package com.sjgs.gis.service.dto;

import io.swagger.annotations.ApiModel;
import java.time.Instant;
import javax.validation.constraints.*;
import java.io.Serializable;
import com.sjgs.gis.domain.enumeration.NodeStatus;

/**
 * A DTO for the {@link com.sjgs.gis.domain.Node} entity.
 */
@ApiModel(description = "Node entity.\n@author The JHipster team.")
public class NodeDTO implements Serializable {
    
    private Long id;

    @NotNull
    private String nodeInstanceId;

    @NotNull
    private String nodeAddr;

    @NotNull
    private String version;

    @NotNull
    private String warUrl;

    private String dataUrl;

    private Instant createTime;

    private NodeStatus status;


    private Long jdbcClusterId;
    
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getNodeInstanceId() {
        return nodeInstanceId;
    }

    public void setNodeInstanceId(String nodeInstanceId) {
        this.nodeInstanceId = nodeInstanceId;
    }

    public String getNodeAddr() {
        return nodeAddr;
    }

    public void setNodeAddr(String nodeAddr) {
        this.nodeAddr = nodeAddr;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getWarUrl() {
        return warUrl;
    }

    public void setWarUrl(String warUrl) {
        this.warUrl = warUrl;
    }

    public String getDataUrl() {
        return dataUrl;
    }

    public void setDataUrl(String dataUrl) {
        this.dataUrl = dataUrl;
    }

    public Instant getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Instant createTime) {
        this.createTime = createTime;
    }

    public NodeStatus getStatus() {
        return status;
    }

    public void setStatus(NodeStatus status) {
        this.status = status;
    }

    public Long getJdbcClusterId() {
        return jdbcClusterId;
    }

    public void setJdbcClusterId(Long jdbcClusterId) {
        this.jdbcClusterId = jdbcClusterId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof NodeDTO)) {
            return false;
        }

        return id != null && id.equals(((NodeDTO) o).id);
    }

    @Override
    public int hashCode() {
        return 31;
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "NodeDTO{" +
            "id=" + getId() +
            ", nodeInstanceId='" + getNodeInstanceId() + "'" +
            ", nodeAddr='" + getNodeAddr() + "'" +
            ", version='" + getVersion() + "'" +
            ", warUrl='" + getWarUrl() + "'" +
            ", dataUrl='" + getDataUrl() + "'" +
            ", createTime='" + getCreateTime() + "'" +
            ", status='" + getStatus() + "'" +
            ", jdbcClusterId=" + getJdbcClusterId() +
            "}";
    }
}
